#include<bits/stdc++.h>

using namespace std;

//greatest common divisor;
int main() {
    int a = 6, b = 8;
    int c = 1;
    for (int i = a + b; i >= 1; --i) {
        if (a % i == 0 && b % i == 0) {
            c = i;
            break;
        }
    }
    cout << c;
    return 0;
}
